<template>
	<view class="msg-container">
		
		<view class="msg-item" v-for="(ite,idx) in logList" :key="idx" @tap="$go('/showcase/user/msgDetail?id='+ite.id)">
			<image src="/static/logo.png" mode="aspectFill" class="pic"></image>
			<view class="display-flex just-between title">
				<text>月满人间 家国同庆</text>
				<image :src="'/images/rarr.png'  | formatImgUrl" class="arrow" mode="aspectFit"></image>
			</view>
			<view class="time">
				10月1日-10月1日
			</view>
		</view>
		
		<view class="empytView" v-if="!logList.length">
			<image :src="'/images/kong.png' | formatImgUrl" mode="widthFix" />
		</view>
	</view>
</template>

<script>
	export default{
		data(){
			return {
				page: 1,
				logList: []
			}
		},
		onLoad(e) {
			this.page = 1
			this.getList()
		},
		onReachBottom() {
			this.page++;
			this.getList();
		},
		methods:{
			getList(){
				this.$api.default.request('user/get_mychat_zhushou', {
					page: this.page
				}).then((res) => {
					if (res.code) {
						this.row = res.data
						if (this.page > 1) {
							res.data.forEach((item) => {
								this.logList.push(item)
							})
						} else {
							this.logList = res.data
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background: rgba(242, 245, 242, 1);
	}
	
	.msg-container{
		padding: 30rpx;
		
		.msg-item{
			padding: 30rpx;
			border-radius: 4px;
			background-color: #fff;
			margin-bottom: 10px;
		}
		
		.pic{
			display: block;
			width: 100%;
			height: 188px;
			border-radius: 4px;
		}
		
		.title{
			margin-top: 10px;
			padding-top: 12px;
			border-top: 1px solid #F2F5F2;
			
			text{
				font-family: 思源黑体;
				font-size: 14px;
				font-weight: bold;
				color: #3D3D3D;
			}
			
			image{
				width: 16px;
				height: 16px;
			}
		}
		
		.time{
			margin-top: 4px;
			font-family: Source Han Sans;
			font-size: 10px;
			color: #999999;
		}
	}
</style>